export default store => {
    if (localStorage.lotteryState) store.replaceState(JSON.parse(localStorage.lotteryState))
    store.subscribe((mutation, state) => {
        localStorage.lotteryState = JSON.stringify(state)
    })
}